file chooser: Make Ctrl-L work in recent
authorMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jan 2015 22:21:14 +0000 (17:21 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jan 2015 22:35:22 +0000 (17:35 -0500)
Just switch to browse mode when we see Ctrl-L in recent mode.
https://bugzilla.gnome.org/show_bug.cgi?id=660450

gtk/gtkfilechooserwidget.c

index 1681e084925d7ebdeb19bf697555b7cec4cb0acf..204a877dae197775c886454885979160eeb92d7a 100644 (file)
@@ -2171,10 +2171,14 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl)
    * browse_header_box container, so there's no point in switching
    * to it.
    */
-  if (priv->operation_mode == OPERATION_MODE_SEARCH ||
-      priv->operation_mode == OPERATION_MODE_RECENT)
+  if (priv->operation_mode == OPERATION_MODE_SEARCH)
     return;
 
+  if (priv->operation_mode == OPERATION_MODE_RECENT &&
+      (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+       priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER))
+    operation_mode_set (impl, OPERATION_MODE_BROWSE);
+
   /* If the file entry is not visible, show it.
    * If it is visible, turn it off only if it is focused.  Otherwise, switch to the entry.
    */